import os
import time

import pytest

if __name__ == '__main__':
    # 1.执行测试用例
    pytest.main()
    time.sleep(3)
    # 2.生成测试报告
    os.system("allure generate report -o allure-report --clean")
    # 3.打开测试报告
    os.system("allure open allure-report")